package com.test.langchain4j.config;

import com.test.langchain4j.service.FileMcpService;
import dev.langchain4j.model.chat.StreamingChatModel;
import java.util.Collections;
import java.util.List;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA.
 *
 * @description: { "mcpServers": { "desktop-commander": { "command": "npx", "args": [ "-y",
 *     "@wonderwhy-er/desktop-commander" ] } } }
 * @author: liuziyang
 * @since: 2025/8/6 20:45
 * @modifiedBy:
 * @version: 1.0
 */
@Configuration
public class OtherMcpConfig {
  @Bean
  public FileMcpService fileMcpService(StreamingChatModel streamingChatModel) {
    return AiServiceFactory.getAiService(
        FileMcpService.class,
        streamingChatModel,
        List.of("cmd", "/c", "npx", "-y", "@wonderwhy-er/desktop-commander"),
        Collections.emptyMap());
  }
}
